#include <stdio.h>
#include <linux/hdreg.h>
#include "Private.h"
#include "System.h"

/// <summary>
/// The GetGroupID function 
/// returns the real group ID
/// of the calling process.
/// </summary>
const wchar_t *disks[] =
{
	DISK_HANDLE(a),
	DISK_HANDLE(b),
	DISK_HANDLE(c),
	DISK_HANDLE(d),
	DISK_HANDLE(e),
	DISK_HANDLE(f),
	DISK_HANDLE(g),
	DISK_HANDLE(h),
};

/// <summary>
/// The GetGroupID function 
/// returns the real group ID
/// of the calling process.
/// </summary>
int GetDisks(void)
{

	return 0;
}

/// <summary>
/// The GetGroupID function 
/// returns the real group ID
/// of the calling process.
/// </summary>
int GetDiskCount(void)
{
	int count = 0;
	int index = 0;
	int handle = -1;
	for (; index < DISC_COUNT; index++) {
		//printf("%s\n", DISK_HANDLE2(a));
		if ((handle = Open(disks[index], /*O_RDWR*/0, 0)) < 0)
			continue;
		Close(handle);
		count++;
	}
	return count;
}